package com.tekj.cxqcb.view.Module.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.view.Module.adapter.TrafficManagementAdapter;
import com.tekj.cxqcb.view.Module.decoration.SpacesItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;
import common.base.activity.BaseActivity;

/**
 * 车行申请列表
 */
public class TrafficManagementActivity extends BaseActivity {

    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.tv_l)
    TextView tvL;
    @BindView(R.id.ll_back)
    LinearLayout llBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_r)
    ImageView ivR;
    @BindView(R.id.tv_r)
    TextView tvR;
    @BindView(R.id.ll_right)
    LinearLayout llRight;
    @BindView(R.id.rl_title_bg)
    RelativeLayout rlTitleBg;
    @BindView(R.id.rv_main)
    RecyclerView rvMain;
    @BindView(R.id.btn_click)
    Button btnClick;

    TrafficManagementAdapter managementAdapter;

    @Override
    public void init() {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add("");
        }
        managementAdapter = new TrafficManagementAdapter(list);
        rvMain.setLayoutManager(new LinearLayoutManager(activity));
        rvMain.setAdapter(managementAdapter);
        rvMain.addItemDecoration(new SpacesItemDecoration(1));


        managementAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
            @Override
            public void onLoadMoreRequested() {

            }
        }, rvMain);
        managementAdapter.setEmptyView(R.layout.rv_empty);
    }

    @Override
    public int setLayout() {
        return R.layout.activity_traffic_management;
    }

    @Override
    public void initLoadStart() {

    }

    @Override
    public void initLoadEnd() {

    }

    @Override
    public void initBindingView(Object mBean) {

    }

    @OnClick({R.id.ll_back, R.id.ll_right, R.id.btn_click})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_back:
                finish();
                break;
            case R.id.ll_right:
                break;
            case R.id.btn_click:
                break;
        }
    }
}
